package com.jrx.anytxn.customer.handel;

import com.jrx.anytxn.common.exception.TxnBizException;
import com.jrx.anytxn.common.exception.TxnException;
import com.jrx.anytxn.customer.dto.creditinfo.*;
import com.jrx.anytxn.customer.dto.customer.CreditReferenceReq;
import com.jrx.anytxn.customer.dto.customer.CreditReferenceRes;
import com.jrx.anytxn.customer.dto.customer.CustomerLimitAdjustRes;
import com.jrx.anytxn.customer.dto.customer.CustomerLimitInfoRes;
import com.jrx.anytxn.customer.entity.CmCustomerLimitInfo;
import com.jrx.anytxn.param.entity.BtLimitAdjustInfo;

import java.util.List;

/**
 * 客户额度的api的handel
 *
 * @author Qingyao Xing
 * @date 2019/9/24 10:11
 */
public interface ICustomerLimitInfoHandler {

    /**
     * 授信请求
     * @param creditApprovalReq 授信请求报文
     * @return com.jrx.anytxn.common.data.TxnRespResult<com.jrx.anytxn.customer.dto.BaseApiRes>
     * @author Qingyao Xing
     * @throws TxnException 自定义业务异常
     * @date 2019/9/24 10:12
     */
    void saveCreditApproval(CreditApprovalReq creditApprovalReq) throws Exception;

    /**
     * 额度调整
     * @param creditAdjustReq 额度调整请求报文
     * @return com.jrx.anytxn.common.data.TxnRespResult<com.jrx.anytxn.customer.dto.BaseApiRes>
     * @author Qingyao Xing
     * @throws TxnException 自定义业务异常
     * @date 2019/9/24 10:13
     */
     void modifyCreditApproval(CreditAdjustReq creditAdjustReq) throws TxnException;

    /**
     * 额度冻结，解冻
     * @param creditFreezeReq 额度冻结，解冻请求报文
     * @return com.jrx.anytxn.common.data.TxnRespResult<com.jrx.anytxn.customer.dto.BaseApiRes>
     * @author Qingyao Xing
     * @throws TxnException 自定义业务异常
     * @date 2019/9/24 10:13
     */
    void modifyCreditFreeze(CreditFreezeReq creditFreezeReq) throws TxnException;

    /**
     * 客户额度树查询
     *@param creditAllInfoQueryReq 客户额度树查询请求报文
     * @return com.jrx.anytxn.common.data.TxnRespResult<com.jrx.anytxn.customer.dto.creditinfo.CreditAllInfoQueryRes>
     * @author Qingyao Xing
     * @throws TxnException 自定义业务异常
     * @date 2019/9/24 10:13
     */
    CreditAllInfoQueryRes getAllCreditApproval(CreditAllInfoQueryReq creditAllInfoQueryReq) throws TxnException;

    /**
     * 客户额度查询
     * @param creditInfoQueryReq 客户额度查询请求报文
     * @return com.jrx.anytxn.common.data.TxnRespResult<com.jrx.anytxn.customer.dto.creditinfo.CreditInfoQueryRes>
     * @author Qingyao Xing
     * @throws TxnException 自定义业务异常
     * @date 2019/9/24 10:14
     */
    CreditInfoQueryRes getCreditApproval(CreditInfoQueryReq creditInfoQueryReq) throws TxnException;

    /**
     * 批量调额
     * @param btLimitAdjustInfo 调额信息
     */
    CmCustomerLimitInfo batchLimitAdjust(BtLimitAdjustInfo btLimitAdjustInfo) throws TxnException;


    /**
     * cms页面相关的额度冻结，解冻,调额
     * @param creditFreezeReq 额度冻结，解冻,调额请求报文
     * @return com.jrx.anytxn.common.data.TxnRespResult<com.jrx.anytxn.customer.dto.BaseCmsRes>
     * @author xuhui.gao
     * @throws TxnException 自定义业务异常
     * @date 2020/8/31 10:13
     */
    List<CustomerLimitInfoRes> modifyCreditFreezeByCmsClient(CreditFreezeOfCmsReq creditFreezeReq) throws TxnException;

    /**
     * 取消授信
     * @param creditCancelReq 取消授信接口请求报文
     * @author 张靖烽
     * @throws TxnException 自定义业务异常
     * @date 2021/3/09 10:13
     */
    void cancelCredit(CreditCancelReq creditCancelReq) throws TxnException;

    /**
     * 额度激活
     * @param creditActiveReq
     */
    void creditActive(CreditActiveReq creditActiveReq) throws TxnException;

    /**
     * 人行征信查询依据实时接口
     * @param creditReferenceReq
     * @return
     * @throws TxnException
     */
    CreditReferenceRes creditReference(CreditReferenceReq creditReferenceReq) throws TxnException;

    /**
     * cms客户额度注销校验
     * @param creditFreezeReq
     * @return
     * @throws TxnException
     */
    CustomerLimitAdjustRes cancelLimitVerify(CreditFreezeOfCmsReq creditFreezeReq) throws TxnException;
}
